/*
 * 
 * 
 * 
 */
package com.hboxs.asl.service.impl;

import com.hboxs.asl.Page;
import com.hboxs.asl.Pageable;
import com.hboxs.asl.dao.ReceiverDao;
import com.hboxs.asl.entity.Member;
import com.hboxs.asl.entity.Receiver;
import com.hboxs.asl.service.ReceiverService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Service - 收货地址
 */
@Service("receiverServiceImpl")
public class ReceiverServiceImpl extends BaseServiceImpl<Receiver, Long> implements ReceiverService {

    @Resource(name = "receiverDaoImpl")
    private ReceiverDao receiverDao;

    @Resource(name = "receiverDaoImpl")
    public void setBaseDao(ReceiverDao receiverDao) {
        super.setBaseDao(receiverDao);
    }

    @Transactional(readOnly = true)
    public Receiver findDefault(Member member) {
        return receiverDao.findDefault(member);
    }

    @Transactional(readOnly = true)
    public Page<Receiver> findPage(Member member, Pageable pageable) {
        return receiverDao.findPage(member, pageable);
    }

}